package com.kakame.pastime.common.utils;

import org.slf4j.LoggerFactory;

import com.jfinal.log.Log;

import org.slf4j.Logger;

public class LoggerUtil extends Log {
	private static final String packageName = LoggerUtil.class.getPackage().getName();
	private static final Logger defaultLog = LoggerFactory.getLogger(packageName + ".default");
	public static final LoggerUtil Logger = new LoggerUtil(LoggerUtil.defaultLog);
	private Logger logger;

	private LoggerUtil(Logger logger) {
		this.logger = logger;
	}

	@Override
	public void debug(String message) {
		logger.debug(message);
	}

	@Override
	public void debug(String message, Throwable t) {
		logger.debug(message, t);
	}

	@Override
	public void info(String message) {
		logger.info(message);
	}

	@Override
	public void info(String message, Throwable t) {
		logger.info(message, t);
	}

	@Override
	public void warn(String message) {
		logger.warn(message);
	}

	@Override
	public void warn(String message, Throwable t) {
		logger.warn(message, t);

	}

	@Override
	public void error(String message) {
		logger.error(message);
	}

	@Override
	public void error(String message, Throwable t) {
		logger.error(message, t);
	}

	@Override
	public void fatal(String message) {
		logger.error(message);

	}

	@Override
	public void fatal(String message, Throwable t) {
		logger.error(message, t);
	}

	@Override
	public boolean isDebugEnabled() {
		return logger.isDebugEnabled();
	}

	@Override
	public boolean isInfoEnabled() {
		return logger.isInfoEnabled();
	}

	@Override
	public boolean isWarnEnabled() {
		return logger.isWarnEnabled();
	}

	@Override
	public boolean isErrorEnabled() {
		return logger.isErrorEnabled();
	}

	@Override
	public boolean isFatalEnabled() {
		return logger.isErrorEnabled();
	}

}